package design.observer;

// 具体观察者
public class ConcreteObserver extends Observer {
    public ConcreteObserver(Topic topic) {
        this.topic = topic;
        this.topic.attach(this);
    }

    @Override
    public void update() {
        System.out.println("具体观察者: " + topic.getState());
    }
}
